package com.qiang.util;


import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @package: com.qiang.util
 * @title: CollctionTest
 * @projectName: burning
 * @date:  2020-04-29 17:41
 * @version: V1.0
 * @retrun com.qiang.util.burning
 */
public class CollctionTest {

    public static void main(String[] args) {

        List<String> list = new ArrayList<>();
        list.add("张三");
        list.add("李四");
        list.add("王五");
        list.add("小六");

        Iterator<String> iterator = list.iterator();

        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }


        list.remove("张三");
        System.out.println("##############################");
        iterator = list.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }

    }
}
